;(function($){
//左右抖动效果:$('#dom|.dom').shake(3,20,300);其中count->抖动次数；distance->抖动左右距离；duration->持续时间
  $.fn.shake = function (count,distance,duration,callback){
    this.each(function(){
      var jqDom = $(this);
      jqDom.css({ position:'relative'});
      for (var x = 1; x <= count; x++) {
        jqDom.animate({ left: (distance * -1) }, (((duration / count) / 4)))
          .animate({ left: distance }, ((duration / count) / 2))
          .animate({ left: 0 }, (((duration / count) / 4)));
      }
    });
    if(callback){
      callback();
    }
    return this;
  }
})(jQuery);
function runShake(dom,callback){
  $(dom).shake(2,10,300,callback);
}